package com.ruoyi.project.system.address.service.impl;

import java.util.List;

import com.ruoyi.project.system.address.domain.Area;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.address.mapper.ZzAddressMapper;
import com.ruoyi.project.system.address.domain.ZzAddress;
import com.ruoyi.project.system.address.service.IZzAddressService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-10-31
 */
@Service
public class ZzAddressServiceImpl implements IZzAddressService 
{
    @Autowired
    private ZzAddressMapper zzAddressMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param addressId 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public ZzAddress selectZzAddressById(Integer addressId)
    {
        return zzAddressMapper.selectZzAddressById(addressId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param zzAddress 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<ZzAddress> selectZzAddressList(ZzAddress zzAddress)
    {
        return zzAddressMapper.selectZzAddressList(zzAddress);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param zzAddress 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertZzAddress(ZzAddress zzAddress)
    {
        return zzAddressMapper.insertZzAddress(zzAddress);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param zzAddress 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateZzAddress(ZzAddress zzAddress)
    {
        return zzAddressMapper.updateZzAddress(zzAddress);
    }

    /**
     * 删除【请填写功能名称】对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZzAddressByIds(String ids)
    {
        return zzAddressMapper.deleteZzAddressByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param addressId 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteZzAddressById(Integer addressId)
    {
        return zzAddressMapper.deleteZzAddressById(addressId);
    }

    /**
     * 四级联动查询地名
     * @param parentID
     * @return
     */
    @Override
    public List<Area> findMore(Integer parentID) {
        return zzAddressMapper.selectMore(parentID);
    }
}
